/*    */ package com.zimbra.cs.account;
/*    */ 
/*    */ import com.google.common.collect.ImmutableBiMap;
/*    */ import com.google.common.collect.ImmutableSet;
/*    */ import com.zimbra.common.account.SignatureUtil;
/*    */ import java.util.HashSet;
/*    */ import java.util.Iterator;
/*    */ import java.util.Map;
/*    */ import java.util.Map.Entry;
/*    */ import java.util.Set;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class Signature
/*    */   extends AccountProperty
/*    */   implements Comparable
/*    */ {
/*    */   public Signature(Account acct, String name, String id, Map<String, Object> attrs, Provisioning prov)
/*    */   {
/* 29 */     super(acct, name, id, attrs, null, prov);
/*    */   }
/*    */   
/*    */   public Entry.EntryType getEntryType()
/*    */   {
/* 34 */     return Entry.EntryType.SIGNATURE;
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public void setId(String id)
/*    */   {
/* 43 */     this.mId = id;
/* 44 */     getRawAttrs().put("zimbraSignatureId", id);
/*    */   }
/*    */   
/*    */   public static class SignatureContent {
/*    */     private String mMimeType;
/*    */     private String mContent;
/*    */     
/*    */     public SignatureContent(String mimeType, String content) {
/* 52 */       this.mMimeType = mimeType;
/* 53 */       this.mContent = content;
/*    */     }
/*    */     
/* 56 */     public String getMimeType() { return this.mMimeType; }
/* 57 */     public String getContent() { return this.mContent; }
/*    */   }
/*    */   
/*    */   public Set<SignatureContent> getContents() {
/* 61 */     Set<SignatureContent> contents = new HashSet();
/*    */     
/* 63 */     for (Iterator it = SignatureUtil.ATTR_TYPE_MAP.entrySet().iterator(); it.hasNext();) {
/* 64 */       Map.Entry entry = (Map.Entry)it.next();
/*    */       
/* 66 */       String content = getAttr((String)entry.getKey());
/* 67 */       if (content != null) {
/* 68 */         contents.add(new SignatureContent((String)entry.getValue(), content));
/*    */       }
/*    */     }
/* 71 */     return contents;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/Signature.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */